<template>
  <div class="select_scan">
    <div class="scan_title">扫码登陆</div>
    <div class="QR_code">
      <div class="QR_img">
        <img :src="QRimg" alt="" />
      </div>
    </div>
    <div class="QR_tips">
      <img :src="QRimg2" alt="" />
    </div>
    <div class="scan_footer">请进入手机 "设置-欢太账号 "扫码登陆</div>
  </div>
</template>

<script>
import { getGoods } from "../assets/request";
export default {
  data() {
    return {
      goods: [],
      QRimg: "",
      QRimg2: "",
    };
  },
  async created() {
    await getGoods({
      project_id: 78,
      limit: 200,
    })
    .then(res=>{
       this.goods = res.rows.sort((a, b) => a.id - b.id);
        this.QRimg = this.goods.slice(80, 81)[0].s_goods_photos[0].path;
      this.QRimg2 = this.goods.slice(79, 80)[0].s_goods_photos[0].path;
    })

  },
};
</script>

<style lang="scss" scoped>
.select_scan {
  padding-top: 50px;
  .scan_title {
    font-size: 26px;
    line-height: 37px;
    text-align: center;
    margin-bottom: 40px;
  }
  .QR_code {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border: 1px solid #d8d8d8;
    border-radius: 9px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 25px;
    .QR_img {
      width: 150px;
      height: 150px;
      img {
        width: 100%;
        height: 100%;
      }
    }
  }
  .QR_tips {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    img {
      width: 100%;
      height: 100%;
    }
  }
  .scan_footer {
    color: #000;
    font-size: 14px;
    font-weight: 500;
    margin-top: 22px;
    opacity: 0.7;
    padding-bottom: 40px;
    text-align: center;
  }
}
</style>